const BASE_URL = 'msg/systemChannel/'
export default {

  queryMsgSystem (_source, data, callBack) {
    let submitParameter = {
      url: BASE_URL + 'queryMsgSystem',
      data: data
    }
    _source.Base.submit(_source, submitParameter, {
      successCallback: function (data) {
        if (data.errors === null) {
          callBack(data)
        } else {
          if (data.errors instanceof Array) {
            for (let i = 0; i < data.errors.length; i++) {
              _source.$message.error(data.errors[i].msg)
            }
          } else {
            _source.$message.error(data.errors)
          }
        }
      }
    })
  }
}
